package com.iotechn.unimall.data.util;

import com.aliyun.oss.OSSClient;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OSSClientConfig {
    @Getter
    @Value("LTAI4G9c14PgKvM23WZ9zrpc")
    private String accessId;
    @Getter
    @Value("FpClTp4OVrRRtHEfi3lBOWUoLxKieW")
    private String accessKey;
    @Getter
    @Value("oss-cn-beijing.aliyuncs.com")
    private String endpoint;

    @Bean
    public OSSClient ossClient() {
        return new OSSClient(endpoint, accessId, accessKey);
    }

}
